package com.ibeetl.admin.console.web.query;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.util.enums.CoreDictType;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

public class CheckQuery extends PageParam {


	@Query(name="抽取区间",display=true,type=Query.TYPE_DATE_BETWEEN)
	private String createDateRange;
	private Date createDateMin;
	private Date createDateMax;
	@Query(name="管理机构",display=true,type=Query.TYPE_CONTROL,control="org")
	private String manageCom ;
	@Query(name="业务大类",display=true,type=Query.TYPE_DICT,dict=CoreDictType.ORG_TYPE)
	private String arithmeticId ;
	@Query(name="记账准则",display=true,type=Query.TYPE_DICT,dict=CoreDictType.ORG_TYPE)
	private String versionNo ;


	public String getManageCom() {
		return manageCom;
	}

	public void setManageCom(String manageCom) {
		this.manageCom = manageCom;
	}

	public String getArithmeticId() {
		return arithmeticId;
	}

	public void setArithmeticId(String arithmeticId) {
		this.arithmeticId = arithmeticId;
	}

	public String getVersionNo() {
		return versionNo;
	}

	public void setVersionNo(String versionNo) {
		this.versionNo = versionNo;
	}

	public String getCreateDateRange() {
		return createDateRange;
	}
	public void setCreateDateRange(String createDateRange) {
		this.createDateRange = createDateRange;
		if(StringUtils.isEmpty(createDateRange)) {
			return ;
		}
		Date[] ds = Tool.parseDataRange(createDateRange);
		this.createDateMin=ds[0];
		this.createDateMax =ds[1];
	}
	public Date getCreateDateMin() {
		return createDateMin;
	}
	public void setCreateDateMin(Date createDateMin) {
		this.createDateMin = createDateMin;
	}
	public Date getCreateDateMax() {
		return createDateMax;
	}
	public void setCreateDateMax(Date createDateMax) {
		this.createDateMax = createDateMax;
	}





}
